package com.atguigu.gmall.item.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

@FeignClient(value = "service-item" ,fallback = ItemFeignClientImpl.class)  //fallback = "" 降级处理  如果远程调用失败走此方法
public interface ItemFeignClient {
    //数据汇总 ：
    @GetMapping("/api/item/getItem/{skuId}")
    Map getItem(@PathVariable Long skuId);
}
